﻿<Page
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:SamplePlayer.WinRT"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:pf="using:Microsoft.PlayerFramework"
    xmlns:smmp="using:SM.Media.MediaPlayer"
    x:Class="SamplePlayer.WinRT.MainPage"
    mc:Ignorable="d">

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        <pf:MediaPlayer Name="player"
                        Source="http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8"
                        AudioCategory="BackgroundCapableMedia"
                        IsAudioSelectionVisible="True">
            <pf:MediaPlayer.Plugins>
                <smmp:StreamingMediaPlugin />
            </pf:MediaPlayer.Plugins>
        </pf:MediaPlayer>
        <StackPanel Grid.Row="1" Orientation="Horizontal">
            <Button Content="Play"
                    Height="Auto"
                    Name="playButton"
                    Click="play_Click"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    BorderThickness="2" />
            <Button Content="Stop"
                    Height="Auto"
                    Name="stopButton"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    BorderThickness="2"
                    Click="stopButton_Click" />
            <Button Content="Wake"
                    Height="Auto"
                    Name="wakeButton"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    BorderThickness="2"
                    Click="wakeButton_Click" />
            <Button Content="Previous"
                    Height="Auto"
                    Name="previousButton"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    BorderThickness="2"
                    Click="prevButton_Click" />
            <Button Content="Next"
                    Height="Auto"
                    Name="nextButton"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    BorderThickness="2"
                    Click="nextButton_Click" />
        </StackPanel>
    </Grid>
</Page>
